package com.waimai.www.vo;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.waimai.www.po.Caipin;
import com.waimai.www.po.Orders;
import com.waimai.www.po.Users;
import com.waimai.www.service.UserService;

//订餐模块所需要的数据
@Component
public class Dingcandata {

	@Autowired
	UserService userservice;

	Users logged_user;// 登录的用户

	ArrayList<Caipin> showcaipin;

	public Dingcandata not_login() {

		showcaipin = userservice.findAll();

		return this;
	}

	public Dingcandata login(Integer id) {

		logged_user = userservice.findById(id);

		return this;
	}
}
